package com;


import com.fz.entity.Teacher;
import com.fz.mapper.TeacherMapper;
import com.fz.mybatis.MyHelper;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

/**
 * Created by Jia on 2017-08-31.
 */
public class Demo {

    @Test
    public void tt(){
        MyHelper mh = new MyHelper();
        SqlSession s = mh.getSession();
        TeacherMapper tdao = s.getMapper(TeacherMapper.class);
        Teacher tea = tdao.queryById(1);
        System.out.println(tea.getName());
        System.out.println(tea.getId());
        System.out.println(tea.getSclass().getCname());
    }
}
